lib/pull: Fetch summary if cached version doesn't match signature
authorDan Nicholson <nicholson@endlessm.com>
Thu, 2 Aug 2018 20:15:28 +0000 (15:15 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 14 Aug 2018 13:38:11 +0000 (13:38 +0000)
commite5061f54d68ea95ab0b953e6cec6eeca26b01a12
tree80fafb0d70bdd5cfdd8aa89132494ecdc4d3ab72
parent1c69f1ed318ed8b9447119b0311074b89637ad61
lib/pull: Fetch summary if cached version doesn't match signature

If for some reason the cached summary doesn't match the cached signature
then fetch the remote summary and verify again. Since commit c4c2b5eb
this is unlikely to happen since the summary will only be cached if it
matches the signature. However, if the summary cache has been corrupted
for any other reason then it's best to be safe and fetch the remote
summary again.

This is essentially the corollary to c4c2b5eb. Where that commit helps
you from getting into the corrupted summary cache in the first place,
this helps you get out of it. Without this the client can get wedged
until a prune or the remote server republishes the summary.

Closes: #1698
Approved by: cgwalters
src/libostree/ostree-repo-pull.c